package com.project.controller;

import com.project.bean.UserBean;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("user")
public class UserController {
    @RequestMapping("findAll")
    public List<UserBean> findAll() {
        List<UserBean> list = new ArrayList<>();
        list.add(new UserBean(1, "张三", LocalDate.parse("1999-05-02"), "15899999999"));
        list.add(new UserBean(5, "张死", LocalDate.parse("1998-05-02"), "15899999555"));
        list.add(new UserBean(4, "张五", LocalDate.parse("1997-05-25"), "15899991232"));
        list.add(new UserBean(3, "张六", LocalDate.parse("1996-07-12"), "15899995555"));
        list.add(new UserBean(7, "张起", LocalDate.parse("1995-06-02"), "15899988989"));
        return list;
    }
}
